using Mysoft.Dbf.Writers;

namespace Mysoft.Dbf
{
    public class ExportAsNumericColumnAttribute : ExportAsColumnAttributeBase
    {
        byte _totalLength;
        byte _decimalPlaces;
        public ExportAsNumericColumnAttribute(string columnName, byte totalSize, byte decimalPlaces)
            : base(columnName)
        {
            _totalLength = totalSize;
            _decimalPlaces = decimalPlaces;
        }

        public override IWriter GetWriter()
        {
            return new NumericFieldWriter(this.ColumnName, _totalLength, _decimalPlaces);
        }
    }
}
